SMAHA02910_단체미수관리[일반].xrw 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>미수관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cmpylst>
  11. <item>
  12. <sel/>
  13. <cmpynm/>
  14. <clamfromdd/>
  15. <clamtodd/>
  16. <claminwon/>
  17. <clamdd/>
  18. <clamamt/>
  19. <lastpaydd/>
  20. <incomeamt/>
  21. <chngamt/>
  22. <restamt/>
  23. <discamt/>
  24. <uncoamt/>
  25. <cmpycd/>
  26. <cmpyno/>
  27. <condflag/>
  28. <clamseqno/>
  29. <clamstat/>
  30. </item>
  31. </cmpylst>
  32. <cmpydetllst>
  33. <item>
  34. <sel/>
  35. <pid/>
  36. <hngnm/>
  37. <hopedd/>
  38. <pkgnm/>
  39. <cmpyamt/>
  40. <incomeamt/>
  41. <chngamt/>
  42. <restamt/>
  43. <discamt/>
  44. <cmpycd/>
  45. <rsrvdd/>
  46. <rsrvno/>
  47. <condflag/>
  48. <clamseqno/>
  49. <healexamflag/>
  50. <orddd/>
  51. <clntempid/>
  52. <rrgstno/>
  53. <contamt/>
  54. <addexamamt/>
  55. <ownbamt/>
  56. </item>
  57. <incmlst>
  58. <sel/>
  59. <incomedd/>
  60. <cashcardflag/>
  61. <incomeamt/>
  62. <restamt/>
  63. <discamt/>
  64. <chngamt/>
  65. <incomestat/>
  66. <clamtrgtcd/>
  67. <remfact/>
  68. <bankid/>
  69. <lastupdtrid/>
  70. <lastupdtdt/>
  71. <incomeflag/>
  72. <clamseqno/>
  73. <incomeseqno/>
  74. <allotmm/>
  75. <aprvdd/>
  76. <aprvflag/>
  77. <aprvtm/>
  78. <aprvno/>
  79. <cardcmpycd/>
  80. <cardno/>
  81. <valiterm/>
  82. <vangb/>
  83. <keyinptflag/>
  84. </incmlst>
  85. </cmpydetllst>
  86. <prnt>
  87. <clamdetl>
  88. <item/>
  89. </clamdetl>
  90. <ownbill>
  91. <item/>
  92. </ownbill>
  93. </prnt>
  94. </main>
  95. <send>
  96. <srchinfo>
  97. <cmpycd/>
  98. <cmpynm/>
  99. <fromdd/>
  100. <todd/>
  101. <condflag>H</condflag>
  102. <clamend/>
  103. </srchinfo>
  104. <srchdetl>
  105. <cmpydata/>
  106. </srchdetl>
  107. <save>
  108. <clam/>
  109. <clamdetl/>
  110. <cnclinfo/>
  111. <card/>
  112. </save>
  113. <cardcashdata>
  114. <aprv>
  115. <depoAmt/>
  116. <cashcardflag>C</cashcardflag>
  117. <indinstflag/>
  118. <cardcashno/>
  119. <valiterm/>
  120. <allotmm/>
  121. <keyinptflag>S</keyinptflag>
  122. <qualcnfmflag>
  123. </qualcnfmflag>
  124. <swipedata/>
  125. </aprv>
  126. </cardcashdata>
  127. </send>
  128. <sendincm>
  129. <cashcardflag>C</cashcardflag>
  130. <clam/>
  131. <clamdetl/>
  132. <cardcash/>
  133. </sendincm>
  134. <init>
  135. <baseinfo>
  136. <initaddrinfo/>
  137. </baseinfo>
  138. <session/>
  139. </init>
  140. <tmp>
  141. <appvanif/>
  142. </tmp>
  143. <hidden>
  144. </hidden>
  145. </root>
  146. </instance>
  147. <submission id="TRAHA00001"/>
  148. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  149. <submission id="TXPAC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmp"/>
  150. <submission id="TRAHA02911" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" resultref="/root/main/cmpylst"/>
  151. <submission id="TRAHA02912" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdetl" resultref="/root/main/cmpydetllst"/>
  152. <submission id="TXAHA02911" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/hidden"/>
  153. <submission id="TXAHA02912" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/sendincm" resultref="/hidden"/>
  154. <submission id="TXAHA02913" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/sendincm" resultref="/hidden"/>
  155. <submission id="TXAHA02314" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/hidden"/>
  156. <submission id="TRPAO00005" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/magm/magminfo" resultref="/root/magm/aprvinfo"/>
  157. <submission id="TRPAO00006" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/rcptuser/rcptuserinfosend" resultref="/root/rcptuser/rcptuserinfo"/>
  158. </model>
  159. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  160. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  161. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  162. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  163. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  164. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  165. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  166. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  167. <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
  168. <script type="javascript" src="../../../ast/healthexambaseweb/js/healcombolist.js"/>
  169. <script type="javascript" ev:event="xforms-ready">
  170. <![CDATA[
  171. fInitUnco();
  172. ]]>
  173. </script>
  174. <script type="javascript">
  175. <![CDATA[
  176. /****************************************************************************************************************************************************************************************
  177. * 미수관리 화면 초기화
  178. ****************************************************************************************************************************************************************************************/
  179. function fInitUnco() {
  180. //공통코드
  181. zbcfGetCodeList(new Array("R0001","A0458"),
  182. new Array("/root/init/initlst/R0001list", "/root/init/initlst/A0458list"));
  183. // 일자
  184. var curDt = getCurrentDate();
  185. var startdate = curDt.substring(0, 4) + "0101";
  186. model.setValue(ipt_fromdate.attribute("ref") , startdate);
  187. model.setValue(ipt_todate.attribute("ref") , curDt);
  188. // model.setValue(ipt_fromdate.attribute("ref") , "20120101");
  189. // model.setValue(ipt_todate.attribute("ref") , "20130131");
  190. // model.setValue("/root/send/srchinfo/condflag", "C");
  191. healGetCodeList(new Array("R001"), new Array("/root/init/baseinfo/initaddrinfo"));
  192. model.makeValue("/root/init/addrinfo/CF1", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'CF1']/cdnm"));
  193. model.makeValue("/root/init/addrinfo/CP1", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'CP1']/cdnm"));
  194. model.makeValue("/root/init/addrinfo/CP2", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'CP2']/cdnm"));
  195. model.makeValue("/root/init/addrinfo/E01", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'E01']/cdnm"));
  196. model.makeValue("/root/init/addrinfo/E02", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'E02']/cdnm"));
  197. model.makeValue("/root/init/addrinfo/E03", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'E03']/cdnm"));
  198. model.makeValue("/root/init/addrinfo/E04", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'E04']/cdnm"));
  199. model.makeValue("/root/init/addrinfo/K01", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'K01']/cdnm"));
  200. model.makeValue("/root/init/addrinfo/K02", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'K02']/cdnm"));
  201. model.makeValue("/root/init/addrinfo/K03", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'K03']/cdnm"));
  202. model.makeValue("/root/init/addrinfo/K04", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'K04']/cdnm"));
  203. model.makeValue("/root/init/addrinfo/PV1", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'PV1']/cdnm"));
  204. model.makeValue("/root/init/addrinfo/PV2", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'PV2']/cdnm"));
  205. model.makeValue("/root/init/addrinfo/VF1", model.getValue("/root/init/baseinfo/initaddrinfo/R001[cdid = 'VF1']/cdnm"));
  206. model.makeValue("/root/init/addrinfo/logoimg", getImageURL("cmc"));
  207. // 초기화
  208. fGetUserInfosSampling();
  209. // 그리드 체크박스
  210. grd_cmpydetllst.fixedcellcheckbox(0 , 1) = true;
  211. model.refresh();
  212. }
  213. function fGetUserInfosSampling(){
  214. var sUserInfosS = getUserInfos();
  215. sUserInfosS = sUserInfosS + "|";
  216. var UserInfosS_Array = sUserInfosS.split("|");
  217. var userid = UserInfosS_Array[0]; //사용자번호
  218. var usernm = UserInfosS_Array[1]; //사용자이름
  219. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  220. var posinstnm = UserInfosS_Array[3]; //소속기관명
  221. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  222. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  223. model.makeNode("/root/init/session/userid");
  224. model.makeNode("/root/init/session/usernm");
  225. model.makeNode("/root/init/session/posinstcd");
  226. model.makeNode("/root/init/session/posinstnm");
  227. model.makeNode("/root/init/session/posdeptcd");
  228. model.makeNode("/root/init/session/posdeptnm")
  229. if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
  230. if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
  231. model.setValue("/root/init/session/userid",userid);
  232. model.setValue("/root/init/session/usernm",usernm);
  233. model.setValue("/root/init/session/posinstcd",posinstcd);
  234. model.setValue("/root/init/session/posinstnm",posinstnm);
  235. model.setValue("/root/init/session/posdeptcd",posdeptcd);
  236. model.setValue("/root/init/session/posdeptnm",posdeptnm);
  237. model.refresh();
  238. }
  239. /***********************************************************************************************************************************************************
  240. * 그리드의 높이 조절
  241. ************************************************************************************************************************************************************/
  242. function fSetGrdSize(vStat,vLoc ){
  243. var gap = 30;
  244. var h_uGrd = parseInt(grd_cmpylst.attribute("height"));
  245. var h_dGrd = parseInt(switch1.attribute("height"));
  246. var top_uGrd = parseInt(grd_cmpylst.attribute("top"));
  247. var top_btn = parseInt(btn_ularge.attribute("top"));
  248. var h_btn = parseInt(btn_ularge.attribute("height"));
  249. if(vLoc == "U"){
  250. btn_usmall.visible = vStat;
  251. btn_ularge.visible = !vStat;
  252. btn_dsamll.visible = !vStat;
  253. btn_dlarge.visible = !vStat;
  254. btn_clam.visible = !vStat;
  255. btn_incm.visible = !vStat;
  256. switch1.visible = !vStat;
  257. grd_cmpydetllst.visible = !vStat;
  258. btn_detlexcel.visible = !vStat;
  259. if(vStat == true) {
  260. grd_cmpylst.attribute("height") = gap + h_uGrd + h_dGrd;
  261. }else {
  262. grd_cmpylst.attribute("height") = h_uGrd - gap - h_dGrd;
  263. }
  264. }else if(vLoc == "D"){
  265. btn_usmall.visible = !vStat;
  266. btn_ularge.visible = !vStat;
  267. btn_dsamll.visible = vStat;
  268. btn_dlarge.visible = !vStat;
  269. grd_cmpylst.visible = !vStat;
  270. btn_cmpyexcel.visible = !vStat;
  271. if(vStat == true) {
  272. btn_dlarge.attribute("top") = top_btn;
  273. btn_dsamll.attribute("top") = top_btn;
  274. btn_clam.attribute("top") = top_btn;
  275. btn_incm.attribute("top") = top_btn;
  276. btn_detlexcel.attribute("top") = top_btn;
  277. switch1.attribute("top") = top_uGrd;
  278. switch1.attribute("height") = gap + h_uGrd + h_dGrd;
  279. grd_cmpydetllst.attribute("height") = gap + h_uGrd + h_dGrd - 12;
  280. }else {
  281. btn_dlarge.attribute("top") = top_uGrd + h_uGrd + gap - 5 - h_btn;
  282. btn_dsamll.attribute("top") = top_uGrd + h_uGrd + gap - 5 - h_btn;
  283. btn_clam.attribute("top") = top_uGrd + h_uGrd + gap - 5 - h_btn;
  284. btn_incm.attribute("top") = top_uGrd + h_uGrd + gap - 5 - h_btn;
  285. btn_detlexcel.attribute("top") = top_uGrd + h_uGrd + gap - 5 - h_btn;
  286. switch1.attribute("top") = top_uGrd + h_uGrd + gap ;
  287. switch1.attribute("height") = h_dGrd - gap - h_uGrd;
  288. grd_cmpydetllst.attribute("height") = h_dGrd - gap - h_uGrd - 12;
  289. }
  290. }
  291. }
  292. /***********************************************************************************************************************************************************
  293. * 계약처의 상세 인원내역정보 조회
  294. ************************************************************************************************************************************************************/
  295. function fGetCmpyDetlList(){
  296. model.resetInstanceNode("/root/send/cardcashdata/aprv");
  297. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "S");
  298. model.setValue("/root/send/cardcashdata/aprv/cashcardflag" , "C"); //R-카드, S-현금영수증, C-현금
  299. rdo_cashcardflag.dispatch("xforms-value-changed");
  300. model.removeNodeset("/root/main/cmpydetllst/item");
  301. model.removeNodeset("/root/main/cmpydetllst/incmlst");
  302. for(var i=1; i<grd_cmpylst.rows; i++){
  303. model.setValue("/root/main/cmpylst/item[" + i + "]/sel", "N");
  304. }
  305. grd_cmpylst.clearStatus();
  306. var chkRow = grd_cmpylst.row;
  307. grd_cmpylst.addStatus(chkRow, "insert");
  308. model.setValue("/root/main/cmpylst/item[" +chkRow + "]/sel", "Y");
  309. model.setValue("/root/send/srchdetl/cmpydata", getGridUpdateData(grd_cmpylst));
  310. if(submit("TRAHA02912")){
  311. grd_cmpylst.clearStatus();
  312. }
  313. fSetRcptSum(); //총계 및 입금대상금액 설정
  314. }
  315. /***********************************************************************************************************************************************************
  316. * 청구내역생성
  317. ************************************************************************************************************************************************************/
  318. function fCretClam(){
  319. grd_cmpylst.clearStatus();
  320. grd_cmpydetllst.clearStatus();
  321. for(var i = 1; i <= grd_cmpylst.rows; i++){
  322. var chk = grd_cmpylst.valueMatrix( i , grd_cmpylst.colRef("sel"));
  323. if(chk == "Y") {
  324. grd_cmpylst.addStatus(i , "insert");
  325. }
  326. }
  327. for(var j = 1; j < grd_cmpydetllst.rows; j++){
  328. var chk = grd_cmpydetllst.valueMatrix( j, grd_cmpydetllst.colRef("sel"));
  329. if(chk == "Y") {
  330. grd_cmpydetllst.addStatus(j , "insert");
  331. }
  332. }
  333. model.setValue("/root/send/save/clam" , getGridUpdateData(grd_cmpylst));
  334. model.setValue("/root/send/save/clamdetl" , getGridUpdateData(grd_cmpydetllst));
  335. submit("TXAHA02911");
  336. }
  337. /***********************************************************************************************************************************************************
  338. * 청구내역삭제
  339. ************************************************************************************************************************************************************/
  340. function fDelClam(){
  341. grd_cmpylst.clearStatus();
  342. grd_cmpydetllst.clearStatus();
  343. for(var i = 1; i <= grd_cmpylst.rows; i++){
  344. var chk = grd_cmpylst.valueMatrix( i , grd_cmpylst.colRef("sel"));
  345. if(chk == "Y") {
  346. grd_cmpylst.addStatus(i , "delete");
  347. }
  348. }
  349. model.setValue("/root/send/save/cnclinfo" , getGridUpdateData(grd_cmpylst));
  350. if(submit("TXAHA02314")){
  351. return true;
  352. }
  353. }
  354. /***********************************************************************************************************************************************************
  355. * 청구 수금액 저장
  356. ************************************************************************************************************************************************************/
  357. function fSaveClamAmt(vIdx){
  358. model.resetInstanceNode("/root/sendincm");
  359. var row = grd_cmpylst.row;
  360. var aprvFlag = "";
  361. grd_cmpydetllst.subtotal("clear", 0, 12);
  362. var limitAmt = model.getValue("/root/main/cmpylst/item[" + row + "]/clamamt");
  363. var exIncmAmt = model.getValue("/root/main/cmpylst/item[" + row + "]/incomeamt");
  364. var cmpycd = model.getValue("/root/main/cmpylst/item[" + row + "]/cmpycd");
  365. var cmpyno = model.getValue("/root/main/cmpylst/item[" + row + "]/cmpyno");
  366. var depoAmt = model.getValue("/root/send/cardcashdata/aprv/depoAmt");
  367. var cashcardflag = model.getValue("/root/send/cardcashdata/aprv/cashcardflag");
  368. if(limitAmt == "") limitAmt = 0;
  369. if(exIncmAmt == "") exIncmAmt = 0;
  370. if(depoAmt == "") depoAmt = 0;
  371. if(depoAmt <= 0){
  372. messageBox("입금액이 없습니다.", "E");
  373. return false;
  374. }
  375. //R-카드, S-현금영수증, C-현금
  376. if("R" == cashcardflag){
  377. if(fCardReceipt()){
  378. if(fSaveClam(cashcardflag)){
  379. return true;
  380. }
  381. }
  382. }else if("S" == cashcardflag){
  383. if(fCashReceipt()){
  384. if(fSaveClam(cashcardflag)){
  385. return true;
  386. }
  387. }
  388. }else if("C" == cashcardflag){
  389. if(depoAmt > 300000){
  390. if(messageBox("현금 30만원 이상 인 경우 현금영수증을 발행해야 됩니다.\n발행하지 않고 진행", "S001" ) != 6 ){
  391. return false;
  392. }else{
  393. if(fSaveClam(cashcardflag)){
  394. return true;
  395. }
  396. }
  397. }else{
  398. if(fSaveClam(cashcardflag)){
  399. return true;
  400. }
  401. }
  402. }
  403. }
  404. /*
  405. * 입금정보 저장
  406. */
  407. function fSaveClam(cashcardflag){
  408. grd_cmpylst.clearStatus();
  409. grd_cmpylst.addStatus(grd_cmpylst.row, "update");
  410. for(var j=1; j<grd_cmpydetllst.rows; j++){
  411. grd_cmpydetllst.addStatus(j, "update");
  412. }
  413. model.setValue("/root/sendincm/cashcardflag" , cashcardflag);
  414. model.setValue("/root/sendincm/clam" , getGridUpdateData(grd_cmpylst));
  415. model.setValue("/root/sendincm/clamdetl" , getGridUpdateData(grd_cmpydetllst));
  416. if(submit("TXAHA02912")){
  417. return true;
  418. }
  419. }
  420. /*
  421. * 카드 승인
  422. */
  423. function fCardReceipt(){
  424. var vangb = "01";
  425. var gPid = "3134314"; //기관미수 환자
  426. var keyinptflag = model.getValue("/root/send/cardcashdata/aprv/keyinptflag");
  427. var sdata10 = "";
  428. var cardcashno = model.getValue("/root/send/cardcashdata/aprv/cardcashno");
  429. var valiterm = model.getValue("/root/send/cardcashdata/aprv/valiterm");
  430. var allotmm = model.getValue("/root/send/cardcashdata/aprv/allotmm");
  431. var depoAmt = model.getValue("/root/send/cardcashdata/aprv/depoAmt");
  432. if(cardcashno == ""){
  433. messageBox("카드번호는 필수 입력항목입니다.", "E999", "");
  434. return false;
  435. }
  436. if(valiterm == ""){
  437. messageBox("유효기간은 필수 입력항목입니다.", "E999", "");
  438. return false;
  439. }
  440. if(allotmm == ""){
  441. messageBox("할부개월수는 필수 입력항목입니다.", "E999", "");
  442. return false;
  443. }
  444. if(keyinptflag == "S"){
  445. sdata10 = model.getValue("/root/send/cardcashdata/aprv/swipedata");
  446. }
  447. fAppCardVanData(vangb //data1 //vangb van사구분
  448. ,"11" //data2 //ordergb 거래구분
  449. ,getCurrentDate() //data3 //mdate 회계일자
  450. ,gPid //data4 //pano 등록번호
  451. ,"H" //data5 //iogb 입외구분
  452. ,"" //data6 //deptcode 진료과코드
  453. ,"" //data7 //diagdate 진료일자
  454. ,model.getValue("/root/init/session/userid") //data8 //clientid 수납자
  455. ,keyinptflag //data9 //entrymode 입력구분
  456. ,sdata10 //data10 //track2data 트랙data
  457. ,cardcashno //data11 //cardnumber 카드번호
  458. ,valiterm //data12 //cardperiod 유효기간/자격확인구분(valiterm/qualcnfmflag)
  459. ,allotmm //data13 //carddivide 할부개월수/개인법인구분(allotmm/indinstflag)
  460. ,depoAmt //data14 //netamt 금액
  461. ,"" //data15 //oldappdate 원거래승인일자(취소시)
  462. ,"" //data16 //oldapptime 원거래승인시간(취소시)
  463. ,"" //data17 //oldappno 원거래승인번호(취소시)
  464. );
  465. if(model.getValue("/root/tmp/appvanif/replystat") != "0000"){
  466. messageBox("카드승인실패 => "+ model.getValue("/root/tmp/appvanif/cardname"), "E999","");
  467. return false;
  468. }else{
  469. copyNodesetType("/root/sendincm/cardcash" , "/root/tmp/appvanif", "replace");
  470. model.makeValue("/root/sendincm/cardcash/vangb" , vangb);
  471. model.makeValue("/root/sendincm/cardcash/incomeamt" , depoAmt);
  472. model.makeValue("/root/sendincm/cardcash/keyinptflag" , keyinptflag);
  473. model.makeValue("/root/sendincm/cardcash/valiterm" , valiterm);
  474. model.makeValue("/root/sendincm/cardcash/allotmm" , allotmm);
  475. if(keyinptflag == "S"){
  476. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata10);
  477. }else{
  478. model.makeValue("/root/sendincm/cardcash/cardcashno" , cardcashno);
  479. }
  480. //전자서명 처리
  481. var parm = gPid + "▦" + //PID
  482. depoAmt + "▦" + //수납대상금액
  483. "12" + "▦" + //승인구분
  484. model.getValue("/root/tmp/appvanif/approvaldate") + "▦" + //승인일자
  485. model.getValue("/root/tmp/appvanif/approvaltime") + "▦" + //승인시간
  486. model.getValue("/root/tmp/appvanif/approvalno") + "▦" + //승인번호
  487. model.getValue("/root/hidden1/session/posinstcd") + "▦" //기관코드
  488. ;
  489. setParameter("SPPAO02101_PARM", parm);
  490. if(model.getValue("/root/tmp/h_passyn/passyn") != "Y"){
  491. modal("../../../pam/pamcomnweb/xrw/SPPAO02101", "1","400", "400", "SPPAO02101", "", "");
  492. }
  493. return true;
  494. }
  495. }
  496. function fAfterChangeCardNo(){
  497. if ((ipt_cardno.currentText).length >16) {
  498. //16자리보다 크면, "="이 있으면, swipe
  499. if((ipt_cardno.currentText).indexOf("=") > 0){
  500. var vSwipeData = "";
  501. var vCardno_array = "";
  502. var vCardno = "";
  503. vSwipeData = ipt_cardno.currentText;
  504. //swipe 시 첫글자에 ?
  505. if ( vSwipeData.indexOf("?") >= 0 ) {
  506. vSwipeData = (vSwipeData).substr(1,37);
  507. }
  508. if ( vSwipeData.indexOf("/") >= 0 ) {
  509. vSwipeData = (vSwipeData).substr(1,37);
  510. }
  511. model.setValue("/root/send/cardcashdata/aprv/swipedata", vSwipeData);
  512. vCardno_array = vSwipeData.split("=");
  513. vCardno = vCardno_array[0];
  514. //swipe 시 첫글자에 ?
  515. if ( vCardno.indexOf("?") >= 0 ) {
  516. vCardno = (vCardno).substr(1,16);
  517. }
  518. if ( vCardno.indexOf("/") >= 0 ) {
  519. vCardno = (vCardno).substr(1,16);
  520. }
  521. //유효일자
  522. var vValiterm = (vCardno_array[1]).substr(0,4);
  523. model.setValue("/root/send/cardcashdata/aprv/cardcashno" , vCardno);
  524. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "S");
  525. model.setValue("/root/send/cardcashdata/aprv/valiterm" , vValiterm);
  526. model.setValue("/root/send/cardcashdata/aprv/allotmm" , "00");
  527. model.refresh();
  528. }
  529. }else if((ipt_cardno.currentText).length == 16){
  530. model.setValue("/root/send/cardcashdata/aprv/cardcashno" , ipt_cardno.currentText);
  531. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "K");
  532. model.setValue("/root/send/cardcashdata/aprv/allotmm" , "00");
  533. model.refresh();
  534. }
  535. }
  536. /*
  537. * 현금영수증 승인
  538. */
  539. function fCashReceipt(){
  540. var vangb = "01";
  541. var gPid = "3134314"; //기관미수 환자
  542. var keyinptflag = model.getValue("/root/send/cardcashdata/aprv/keyinptflag");
  543. var sdata10 = "";
  544. var cardcashno = model.getValue("/root/send/cardcashdata/aprv/cardcashno");
  545. var valiterm = model.getValue("/root/send/cardcashdata/aprv/valiterm");
  546. var allotmm = model.getValue("/root/send/cardcashdata/aprv/allotmm");
  547. var depoAmt = model.getValue("/root/send/cardcashdata/aprv/depoAmt");
  548. var indinstflag = model.getValue("/root/send/cardcashdata/aprv/indinstflag");
  549. var qualcnfmflag = model.getValue("/root/send/cardcashdata/aprv/qualcnfmflag");
  550. if(indinstflag == ""){
  551. messageBox("개인/법인구분은 필수 선택항목입니다.", "E999", "");
  552. return false;
  553. }
  554. if(cardcashno == ""){
  555. messageBox("자격확인번호는 필수 입력항목입니다.", "E999", "");
  556. return false;
  557. }
  558. if(qualcnfmflag == ""){
  559. messageBox("자격확인구분은 필수 선택항목입니다.", "E999", "");
  560. return false;
  561. }
  562. if(keyinptflag == "S"){
  563. sdata10 = model.getValue("/root/send/cardcashdata/aprv/swipedata");
  564. }
  565. fAppCardVanData(vangb //data1 //vangb van사구분
  566. ,"41" //data2 //ordergb 거래구분
  567. ,getCurrentDate() //data3 //mdate 회계일자
  568. ,gPid //data4 //pano 등록번호
  569. ,"H" //data5 //iogb 입외구분
  570. ,"" //data6 //deptcode 진료과코드
  571. ,"" //data7 //diagdate 진료일자
  572. ,model.getValue("/root/hidden1/session/userid") //data8 //clientid 수납자
  573. ,keyinptflag //data9 //entrymode 입력구분
  574. ,sdata10 //data10 //track2data 트랙data
  575. ,cardcashno //data11 //cardnumber 카드번호
  576. ,qualcnfmflag //data12 //cardperiod 유효기간/자격확인구분(valiterm/qualcnfmflag)
  577. ,indinstflag //data13 //carddivide 할부개월수/개인법인구분(allotmm/indinstflag)
  578. ,depoAmt //data14 //netamt 금액
  579. ,"" //data15 //oldappdate 원거래승인일자(취소시)
  580. ,"" //data16 //oldapptime 원거래승인시간(취소시)
  581. ,"" //data17 //oldappno 원거래승인번호(취소시)
  582. );
  583. if (model.getValue("/root/tmp/appvanif/replystat") != "0000" ) {
  584. messageBox("현금영수증승인실패 => "+ model.getValue("/root/send/updatedata/bogj/bogj_cardno") ,"E999","");
  585. return false;
  586. }else{
  587. copyNodesetType("/root/sendincm/cardcash" , "/root/tmp/appvanif", "replace");
  588. model.makeValue("/root/sendincm/cardcash/vangb" , vangb);
  589. model.makeValue("/root/sendincm/cardcash/incomeamt" , depoAmt);
  590. model.makeValue("/root/sendincm/cardcash/keyinptflag" , keyinptflag);
  591. model.makeValue("/root/sendincm/cardcash/valiterm" , qualcnfmflag);
  592. model.makeValue("/root/sendincm/cardcash/allotmm" , indinstflag);
  593. if(keyinptflag == "S"){
  594. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata10);
  595. }else{
  596. model.makeValue("/root/sendincm/cardcash/cardcashno" , cardcashno);
  597. }
  598. return true;
  599. }
  600. }
  601. function fAfterChangeCashNo(){
  602. model.setValue("/root/send/cardcashdata/aprv/cardcashno", ipt_cardno.currentText);
  603. var cardno = model.getValue("/root/send/cardcashdata/aprv/cardcashno");
  604. if((cardno).length > 18){
  605. //16자리보다 크면, "="이 있으면, swipe
  606. if((cardno).indexOf("=") > 0 ){
  607. var vSwipeData = "";
  608. var vCardno_array = "";
  609. var vCardno = "";
  610. vSwipeData = cardno;
  611. //swipe 시 첫글자에 ?
  612. if(vSwipeData.indexOf("?") >= 0){
  613. vSwipeData = (vSwipeData).substr(1,37);
  614. }
  615. if(vSwipeData.indexOf("/") >= 0){
  616. vSwipeData = (vSwipeData).substr(1,37);
  617. }
  618. vSwipeData = vSwipeData.getRightPad(40, " ");
  619. model.setValue("/root/send/cardcashdata/aprv/swipedata" , vSwipeData);
  620. vCardno_array = vSwipeData.split("=");
  621. vCardno = vCardno_array[0];
  622. //swipe 시 첫글자에 ?
  623. if(vCardno.indexOf("?") >= 0){
  624. vCardno = (vCardno).substr(1,16);
  625. }
  626. //유효일자
  627. var vValiterm = (vCardno_array[1]).substr(0, 4);
  628. model.setValue("/root/send/cardcashdata/aprv/cardcashno" , vCardno);
  629. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "S");
  630. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "3"); //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  631. model.setValue("/root/send/cardcashdata/aprv/allotmm" , model.getValue("/root/send/cardcashdata/aprv/indinstflag"));
  632. model.refresh();
  633. }
  634. }else if ((cardno).length == 16 || (cardno).length == 15 || (cardno).length == 18){
  635. var vSwipeData = "";
  636. vSwipeData = cardno+"=";
  637. vSwipeData = vSwipeData.getRightPad(40, " ");
  638. model.setValue("/root/send/cardcashdata/aprv/swipedata" , vSwipeData);
  639. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "K");
  640. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "3"); //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  641. model.refresh();
  642. }else{
  643. var vSwipeData = "";
  644. vSwipeData = cardno+"=";
  645. vSwipeData = vSwipeData.getRightPad(40, " ");
  646. model.setValue("/root/send/cardcashdata/aprv/swipedata" , vSwipeData);
  647. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "K");
  648. //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  649. //길이가 13자리이면,주민번호
  650. if((cardno).length == 13){
  651. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "1"); //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  652. }else{
  653. //앞 3자리 010,011,016,017,018,019 이면 전화
  654. if(cardno.substr(0,3) == "010" ||
  655. cardno.substr(0,3) == "011" ||
  656. cardno.substr(0,3) == "016" ||
  657. cardno.substr(0,3) == "017" ||
  658. cardno.substr(0,4) == "0130" ||
  659. cardno.substr(0,3) == "018" ||
  660. cardno.substr(0,3) == "019"
  661. ){
  662. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "2"); //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  663. }else{
  664. //16자리 길이 미만일 때 13자리 주민번호 제외 후 핸드폰 앞자리 체크 나머지는 사업장
  665. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "4"); //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  666. }
  667. }
  668. model.refresh();
  669. }
  670. }
  671. /*
  672. * 총계 및 입금대상금액 설정
  673. */
  674. function fSetRcptSum(){
  675. //그리드 merge 및 합계 초기화
  676. grd_cmpydetllst.subtotalPosition = "below";
  677. grd_cmpydetllst.multiTotals = true;
  678. grd_cmpydetllst.subtotal("clear", 0, 12);
  679. for(var i=0; i<grd_cmpydetllst.cols; i++){
  680. //소계 및 합계
  681. if((i >= grd_cmpydetllst.colRef("contamt") && i <= grd_cmpydetllst.colRef("discamt"))){
  682. grd_cmpydetllst.subtotal("sum", -1 , i ,"format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#808080; color:#ffffff; font-weight:bold ", grd_cmpydetllst.colRef("sel") , "총계" );
  683. }
  684. }
  685. var exIncmAmt = model.getValue("/root/main/cmpylst/item[" + grd_cmpylst.row + "]/incomeamt");
  686. var depoAmt = 0;
  687. var totIncmAmt = 0;
  688. totIncmAmt = parseInt(totIncmAmt) +
  689. parseInt(model.getXPathValue("sum(/root/main/cmpydetllst/item/incomeamt)")) +
  690. parseInt(model.getXPathValue("sum(/root/main/cmpydetllst/item/ownincomeamt)"));
  691. depoAmt = totIncmAmt - exIncmAmt;
  692. model.setValue("/root/send/cardcashdata/aprv/depoAmt", depoAmt);
  693. model.refresh();
  694. }
  695. ]]>
  696. </script>
  697. </xhtml:head>
  698. <xhtml:body>
  699. <button id="btn_dsamll" class="icon_bottom" style="left:1169px; top:263px; width:26px; height:19px; ">
  700. <caption/>
  701. <script type="javascript" ev:event="DOMActivate">
  702. <![CDATA[
  703. fSetGrdSize(false,"D");
  704. ]]>
  705. </script>
  706. </button>
  707. <button id="btn_usmall" class="icon_top" visibility="hidden" style="left:1169px; top:67px; width:26px; height:19px; ">
  708. <caption/>
  709. <script type="javascript" ev:event="DOMActivate">
  710. <![CDATA[
  711. fSetGrdSize(false,"U");
  712. ]]>
  713. </script>
  714. </button>
  715. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:22px; width:1194px; height:38px; "/>
  716. <line id="line8" class="line_4" style="x1:1110px; y1:25px; x2:1110px; y2:50px; "/>
  717. <button id="btn_selcmpy" class="icon_search" style="left:190px; top:30px; width:16px; height:16px; ">
  718. <caption/>
  719. <script type="javascript" ev:event="DOMActivate">
  720. <![CDATA[
  721. fGetComnCd("SMAHA01500", "09" , "nm", ipt_cmpycd.currentText ,ipt_cmpycd.attribute("ref"), opt_cmpynm.attribute("ref"));
  722. ipt_cmpycd.refresh();
  723. opt_cmpynm.refresh();
  724. ]]>
  725. </script>
  726. </button>
  727. <output id="opt_cmpynm" ref="/root/send/srchinfo/cmpynm" class="output_fix" style="left:210px; top:28px; width:150px; height:19px; "/>
  728. <button id="btn_srchtrgtman" class="btn1_letter2" style="left:1125px; top:30px; width:56px; height:22px; ">
  729. <caption>조회</caption>
  730. <script type="javascript" ev:event="DOMActivate">
  731. <![CDATA[
  732. model.resetInstanceNode("/root/send/cardcashdata/aprv");
  733. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "S");
  734. model.setValue("/root/send/cardcashdata/aprv/cashcardflag" , "C"); //R-카드, S-현금영수증, C-현금
  735. rdo_cashcardflag.dispatch("xforms-value-changed");
  736. model.removeNodeset("/root/main/cmpydetllst/item");
  737. model.removeNodeset("/root/main/cmpydetllst/incmlst");
  738. if(model.getValue("/root/send/srchinfo/condflag") == "H"){
  739. btn_examseqprnt.disabled = true;
  740. btn_prntcustspec.disabled = true;
  741. btn_prntpsnspec.disabled = true;
  742. btn_rsrvprnt.disabled = false;
  743. btn_delclam.disabled = true;
  744. }else if(model.getValue("/root/send/srchinfo/condflag") == "C" || model.getValue("/root/send/srchinfo/condflag") == "I" ){
  745. btn_examseqprnt.disabled = false;
  746. btn_prntcustspec.disabled = false;
  747. btn_prntpsnspec.disabled = false;
  748. btn_rsrvprnt.disabled = true;
  749. btn_delclam.disabled = false;
  750. }
  751. submit("TRAHA02911");
  752. model.refresh();
  753. ]]>
  754. </script>
  755. </button>
  756. <caption id="caption42" class="search_name" style="left:10px; top:29px; width:99px; height:17px; ">사업체 :</caption>
  757. <input id="ipt_cmpycd" ref="/root/send/srchinfo/cmpycd" class="input_search" style="left:104px; top:29px; width:81px; height:19px; ">
  758. <script type="javascript" ev:event="onkeyup">
  759. <![CDATA[
  760. inputEnterKey("btn_selcmpy", "DOMActivate");
  761. ]]>
  762. </script>
  763. </input>
  764. <caption id="caption5" class="search_name" style="left:385px; top:30px; width:100px; height:17px; ">시작일자 :</caption>
  765. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  766. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:163px; height:14px; ">건강검진 단체미수관리</caption>
  767. </group>
  768. <caption id="caption3" class="search_name" style="left:755px; top:30px; width:117px; height:17px; ">조회구분 :</caption>
  769. <input id="ipt_fromdate" ref="/root/send/srchinfo/fromdd" class="input_s_essential" inputtype="date" style="left:480px; top:30px; width:115px; height:19px; "/>
  770. <input id="ipt_todate" ref="/root/send/srchinfo/todd" class="input_s_essential" inputtype="date" style="left:625px; top:30px; width:115px; height:19px; "/>
  771. <group id="group1" style="left:0px; top:734px; width:1195px; height:27px; ">
  772. <button id="btn_prntpsnspec" class="btn6_letter8" visibility="hidden" style="left:125px; top:5px; width:128px; height:22px; ">
  773. <caption>개인별영수증출력</caption>
  774. <script type="javascript" ev:event="DOMActivate">
  775. <![CDATA[
  776. ]]>
  777. </script>
  778. </button>
  779. <button id="btn_prntcustspec" class="btn6_letter7" style="left:5px; top:5px; width:116px; height:22px; ">
  780. <caption>청구내역서출력</caption>
  781. <script type="javascript" ev:event="DOMActivate">
  782. <![CDATA[
  783. exeReportPreview("RPAHA02305","XMLSTR");
  784. ]]>
  785. </script>
  786. </button>
  787. <button id="button1" class="btn4_letter3" style="left:811px; top:3px; width:68px; height:22px; ">
  788. <caption>초기화</caption>
  789. <script type="javascript" ev:event="DOMActivate">
  790. <![CDATA[
  791. model.resetInstanceNode("/root/send/cardcashdata/aprv");
  792. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "S");
  793. model.setValue("/root/send/cardcashdata/aprv/cashcardflag" , "C"); //R-카드, S-현금영수증, C-현금
  794. rdo_cashcardflag.dispatch("xforms-value-changed");
  795. model.removeNodeset("/root/main/cmpylst/item");
  796. model.removeNodeset("/root/main/cmpydetllst/item");
  797. model.refresh();
  798. ]]>
  799. </script>
  800. </button>
  801. <button id="btn_examseqprnt" class="btn4_letter5" style="left:883px; top:3px; width:92px; height:22px; ">
  802. <caption>수금액저장</caption>
  803. <script type="javascript" ev:event="DOMActivate">
  804. <![CDATA[
  805. if(isMagmAprv()){
  806. return false; //마감결제 완료되어있으므로 더이상 진행하지 않음 - PAM.js
  807. }
  808. if(fSaveClamAmt()){
  809. btn_srchtrgtman.dispatch("DOMActivate");
  810. }
  811. ]]>
  812. </script>
  813. </button>
  814. <button id="btn_rsrvprnt" class="btn4_letter6" style="left:979px; top:3px; width:104px; height:22px; ">
  815. <caption>청구내역생성</caption>
  816. <script type="javascript" ev:event="onclick">
  817. <![CDATA[
  818. if(isMagmAprv()){
  819. return false; //마감결제 완료되어있으므로 더이상 진행하지 않음 - PAM.js
  820. }
  821. fCretClam();
  822. btn_srchtrgtman.dispatch("DOMActivate");
  823. ]]>
  824. </script>
  825. </button>
  826. <button id="btn_delclam" class="btn4_letter6" style="left:1087px; top:3px; width:104px; height:22px; ">
  827. <caption>청구내역삭제</caption>
  828. <script type="javascript" ev:event="onclick">
  829. <![CDATA[
  830. if(isMagmAprv()){
  831. return false; //마감결제 완료되어있으므로 더이상 진행하지 않음 - PAM.js
  832. }
  833. var srcCardCashFlag = "";
  834. var cardamt = 0;
  835. var cashamt = 0;
  836. if(grd_incm.rows > 1){
  837. messageBox("입금내역이 존재하는 청구내역은 삭제", "E001");
  838. return;
  839. }
  840. for(var i=0; i<=grd_incm.rows; i++){
  841. srcCardCashFlag = grd_incm.valueMatrix(i, grd_incm.colRef("cashcardflag"));
  842. if(srcCardCashFlag == "R"){
  843. cardamt = cardamt + parseInt(grd_incm.valueMatrix(i , grd_incm.colRef("incomeamt")));
  844. }else if(srcCardCashFlag == "S"){
  845. cashamt = cashamt + parseInt(grd_incm.valueMatrix(i , grd_incm.colRef("incomeamt")));
  846. }
  847. }
  848. if(cardamt != 0){
  849. messageBox("카드 승인취소 후 청구내역 삭제", "C003");
  850. return;
  851. }
  852. if(cashamt != 0){
  853. messageBox("현금영수증 승인취소 후 청구내역 삭제", "C003");
  854. return;
  855. }
  856. if(fDelClam()){
  857. btn_srchtrgtman.dispatch("DOMActivate");
  858. }
  859. ]]>
  860. </script>
  861. </button>
  862. </group>
  863. <select1 id="combo1" ref="/root/send/srchinfo/condflag" class="combo_search" appearance="minimal" style="left:850px; top:30px; width:115px; height:19px; ">
  864. <choices>
  865. <item>
  866. <label>건진일</label>
  867. <value>H</value>
  868. </item>
  869. <item>
  870. <label>청구일</label>
  871. <value>C</value>
  872. </item>
  873. <item>
  874. <label>입금일</label>
  875. <value>I</value>
  876. </item>
  877. </choices>
  878. </select1>
  879. <caption id="caption93" class="search_n_b" style="left:603px; top:30px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  880. <datagrid id="grd_cmpylst" nodeset="/root/main/cmpylst/item" caption="선택^단체명^실시시작일^실시종료일^청구인원^청구일^청구금액^최종입급일^입금액^삭감액^절사액^할인액^미수금액^cmpycd^condflag^clamseqno^clamstat^cmpyamt^ownincomeamt^condflag" colsep="^" colwidth="30, 150, 80, 80, 70, 80, 100, 80, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:90px; width:1195px; height:169px; ">
  881. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  882. <col ref="cmpynm"/>
  883. <col ref="clamfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  884. <col ref="clamtodd" format="yyyy-mm-dd" style="text-align:center; "/>
  885. <col ref="claminwon" format="(-,+)#,###" style="text-align:center; "/>
  886. <col ref="clamdd" format="yyyy-mm-dd" style="text-align:center; "/>
  887. <col ref="clamamt" format="(-,+)#,###" style="text-align:right; "/>
  888. <col ref="lastpaydd" format="yyyy-mm-dd" style="text-align:center; "/>
  889. <col ref="incomeamt" format="(-,+)#,###" style="text-align:right; "/>
  890. <col ref="chngamt" format="(-,+)#,###" style="text-align:right; "/>
  891. <col ref="restamt" format="(-,+)#,###" style="text-align:right; "/>
  892. <col ref="discamt" format="(-,+)#,###" style="text-align:right; "/>
  893. <col ref="uncoamt" format="(-,+)#,###" style="text-align:right; "/>
  894. <col ref="cmpycd" visibility="hidden"/>
  895. <col ref="cmpyno" visibility="hidden"/>
  896. <col ref="condflag" visibility="hidden"/>
  897. <col ref="clamseqno" visibility="hidden"/>
  898. <col ref="clamstat" visibility="hidden"/>
  899. <script type="javascript" ev:event="onclick">
  900. <![CDATA[
  901. if(grd_cmpylst.isCell(event.target) && grd_cmpylst.mouseRow >= grd_cmpylst.fixedrows){
  902. fGetCmpyDetlList();
  903. }
  904. ]]>
  905. </script>
  906. <script type="javascript" ev:event="onaftersort">
  907. <![CDATA[
  908. grd_cmpylst.gridToInstance();
  909. ]]>
  910. </script>
  911. </datagrid>
  912. <caption id="cam_clam" class="tit_2" style="left:5px; top:72px; width:108px; height:13px; ">계약처내역</caption>
  913. <button id="btn_dlarge" class="icon_top" style="left:1169px; top:262px; width:26px; height:19px; ">
  914. <caption/>
  915. <script type="javascript" ev:event="DOMActivate">
  916. <![CDATA[
  917. fSetGrdSize(true,"D");
  918. ]]>
  919. </script>
  920. </button>
  921. <button id="btn_ularge" class="icon_bottom" style="left:1169px; top:67px; width:26px; height:19px; ">
  922. <caption/>
  923. <script type="javascript" ev:event="DOMActivate">
  924. <![CDATA[
  925. fSetGrdSize(true,"U");
  926. ]]>
  927. </script>
  928. </button>
  929. <switch id="switch1" style="left:0px; top:287px; width:1195px; height:363px; border-color:#c7a3cf; border-style:solid; ">
  930. <case id="case1" selected="true">
  931. <datagrid id="grd_cmpydetllst" nodeset="/root/main/cmpydetllst/item" caption="^등록번호^성명^건진일^패키지명^단체금액^단체입금액^삭감액^절사액^할인액^cmpycd^rsrvdd^rsrvno^condflag^clamseqno^healexamflag^orddd^clntempid^rrgstno^contamt^addexamamt^ownbamt" colsep="^" colwidth="45, 100, 100, 100, 250, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:0px; top:27px; width:1190px; height:333px; ">
  932. <col checkvalue="Y,N" ref="sel" type="checkbox" style="text-align:center; "/>
  933. <col ref="pid"/>
  934. <col ref="hngnm"/>
  935. <col ref="hopedd" format="yyyy-mm-dd" style="text-align:center; "/>
  936. <col ref="pkgnm"/>
  937. <col ref="cmpyamt" type="output" format="(-,+)#,###" style="text-align:right; "/>
  938. <col ref="incomeamt" type="input" format="(-,+)#,###" style="text-align:right; "/>
  939. <col ref="chngamt" type="input" format="(-,+)#,###" style="text-align:right; "/>
  940. <col ref="restamt" type="input" format="(-,+)#,###" style="text-align:right; "/>
  941. <col ref="discamt" type="input" format="(-,+)#,###" style="text-align:right; "/>
  942. <col ref="cmpycd" visibility="hidden"/>
  943. <col ref="rsrvdd" visibility="hidden"/>
  944. <col ref="rsrvno" visibility="hidden"/>
  945. <col ref="condflag" visibility="hidden"/>
  946. <col ref="clamseqno" visibility="hidden"/>
  947. <col ref="healexamflag" visibility="hidden"/>
  948. <col ref="orddd" visibility="hidden"/>
  949. <col ref="clntempid" visibility="hidden"/>
  950. <col ref="rrgstno" visibility="hidden"/>
  951. <col ref="contamt" visibility="hidden"/>
  952. <col ref="addexamamt" visibility="hidden"/>
  953. <col ref="ownbamt" visibility="hidden"/>
  954. <script type="javascript" ev:event="xforms-value-changed">
  955. <![CDATA[
  956. //H-건진일, C-청구일, I-입금일
  957. var condflag = grd_cmpylst.valueMatrix(grd_cmpylst.row, grd_cmpylst.colRef("condflag"));
  958. if(condflag == "H"){
  959. return;
  960. }
  961. var chk = "";
  962. if(grd_cmpydetllst.col == grd_cmpydetllst.colRef("sel")){
  963. chk = grd_cmpydetllst.valueMatrix(grd_cmpydetllst.row, grd_cmpydetllst.colRef("sel"));
  964. if(chk == "Y"){
  965. model.setValue("/root/main/cmpydetllst/item[" + grd_cmpydetllst.row + "]/incomeamt", model.getValue("/root/main/cmpydetllst/item[" + grd_cmpydetllst.row + "]/cmpyamt"));
  966. }else if(chk == "N"){
  967. model.setValue("/root/main/cmpydetllst/item[" + grd_cmpydetllst.row + "]/incomeamt", 0);
  968. }
  969. }
  970. fSetRcptSum();
  971. model.refresh();
  972. ]]>
  973. </script>
  974. <script type="javascript" ev:event="xforms-select">
  975. <![CDATA[
  976. var condflag = grd_cmpylst.valueMatrix(grd_cmpylst.row, grd_cmpylst.colRef("condflag"));
  977. if(condflag == "H"){
  978. return;
  979. }
  980. var chk = "";
  981. if(grd_cmpydetllst.row == 0 && grd_cmpydetllst. fixedcellischeck(grd_cmpydetllst.row, grd_cmpydetllst.colRef("sel"))){
  982. for(var i=1; i<grd_cmpydetllst.rows; i++){
  983. chk = grd_cmpydetllst.valueMatrix(i, grd_cmpydetllst.colRef("sel"));
  984. if(chk == "Y"){
  985. model.setValue("/root/main/cmpydetllst/item[" + i + "]/incomeamt", model.getValue("/root/main/cmpydetllst/item[" + i + "]/cmpyamt"));
  986. }else if(chk == "N"){
  987. model.setValue("/root/main/cmpydetllst/item[" + i + "]/incomeamt", 0);
  988. }
  989. }
  990. fSetRcptSum(); //총계 및 입금대상금액 설정
  991. }
  992. ]]>
  993. </script>
  994. <script type="javascript" ev:event="xforms-deselect">
  995. <![CDATA[
  996. var condflag = grd_cmpylst.valueMatrix(grd_cmpylst.row, grd_cmpylst.colRef("condflag"));
  997. if(condflag == "H"){
  998. return;
  999. }
  1000. var chk = "";
  1001. if(grd_cmpydetllst.row == 0 && grd_cmpydetllst. fixedcellischeck(grd_cmpydetllst.row, grd_cmpydetllst.colRef("sel")) == false){
  1002. for(var i=1; i<grd_cmpydetllst.rows; i++){
  1003. chk = grd_cmpydetllst.valueMatrix(i, grd_cmpydetllst.colRef("sel"));
  1004. if(chk == "Y"){
  1005. model.setValue("/root/main/cmpydetllst/item[" + i + "]/incomeamt", model.getValue("/root/main/cmpydetllst/item[" + i + "]/cmpyamt"));
  1006. }else if(chk == "N"){
  1007. model.setValue("/root/main/cmpydetllst/item[" + i + "]/incomeamt", 0);
  1008. }
  1009. }
  1010. fSetRcptSum(); //총계 및 입금대상금액 설정
  1011. }
  1012. ]]>
  1013. </script>
  1014. <script type="javascript" ev:event="onbeforesort">
  1015. <![CDATA[
  1016. grd_cmpydetllst.subtotal("clear", 0, 12)
  1017. ]]>
  1018. </script>
  1019. <script type="javascript" ev:event="onaftersort">
  1020. <![CDATA[
  1021. fSetRcptSum();
  1022. grd_cmpydetllst.gridToInstance();
  1023. ]]>
  1024. </script>
  1025. </datagrid>
  1026. <caption id="caption4" class="tit_2" style="left:5px; top:5px; width:108px; height:15px; ">청구내역</caption>
  1027. <line id="line1" class="line_1" style="x1:0px; y1:22px; x2:1190px; y2:22px; "/>
  1028. </case>
  1029. <case id="case2">
  1030. <datagrid id="grd_incm" nodeset="/root/main/cmpydetllst/incmlst" caption="선택^입금일^현금/카드^입금액^삭감액^절사액^할인액^입금상태^청구처코드^비고사항^은행코드^입력자^입력일^입금구분^청구번호^입금번호^할부개월^승인일자^승인구분^승인시간^승인번호^카드회사^카드번호^유효일자^Van사^입력구분" colsep="^" colwidth="40, 90, 100, 100, 100, 100, 100, 100, 100, 100, 84, 100, 120, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:27px; width:1190px; height:333px; ">
  1031. <col checkvalue="Y,N" ref="sel" type="radio"/>
  1032. <col ref="incomedd" format="yyyy-mm-dd" style="text-align:center; "/>
  1033. <col disabled="true" ref="cashcardflag" type="combo" style="text-align:center; ">
  1034. <choices>
  1035. <item>
  1036. <label>카드</label>
  1037. <value>R</value>
  1038. </item>
  1039. <item>
  1040. <label>현금영수증</label>
  1041. <value>S</value>
  1042. </item>
  1043. <item>
  1044. <label>현금</label>
  1045. <value>C</value>
  1046. </item>
  1047. </choices>
  1048. </col>
  1049. <col ref="incomeamt" format="(-,+)#,###" style="text-align:right; "/>
  1050. <col ref="chngamt" format="(-,+)#,###" style="text-align:right; "/>
  1051. <col ref="restamt" format="(-,+)#,###" style="text-align:right; "/>
  1052. <col ref="discamt" format="(-,+)#,###" style="text-align:right; "/>
  1053. <col ref="incomestat" visibility="hidden" style="text-align:center; "/>
  1054. <col ref="clamtrgtcd" visibility="hidden" style="text-align:center; "/>
  1055. <col ref="remfact" style="text-align:right; "/>
  1056. <col ref="bankid" visibility="hidden" style="text-align:right; "/>
  1057. <col ref="lastupdtrid" format="yyyy-mm-dd" style="text-align:center; "/>
  1058. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1059. <col ref="incomeflag" visibility="hidden"/>
  1060. <col ref="clamseqno" visibility="hidden"/>
  1061. <col ref="incomeseqno" visibility="hidden"/>
  1062. <col ref="allotmm" visibility="hidden"/>
  1063. <col ref="aprvdd" visibility="hidden"/>
  1064. <col ref="aprvflag" visibility="hidden"/>
  1065. <col ref="aprvtm" visibility="hidden"/>
  1066. <col ref="aprvno" visibility="hidden"/>
  1067. <col ref="cardcmpycd" visibility="hidden"/>
  1068. <col ref="cardcashno" visibility="hidden"/>
  1069. <col ref="valiterm" visibility="hidden"/>
  1070. <col ref="vangb" visibility="hidden"/>
  1071. <col ref="keyinptflag" visibility="hidden"/>
  1072. <script type="javascript" ev:event="onclick">
  1073. <![CDATA[
  1074. if(grd_incm.isCell(event.target) && grd_incm.mouseRow >= grd_incm.fixedrows){
  1075. for(var i=1; i<grd_incm.rows; i++){
  1076. model.setValue("/root/main/cmpydetllst/incmlst[" + i + "]/sel", "N");
  1077. }
  1078. model.setValue("/root/main/cmpydetllst/incmlst[" + grd_incm.row + "]/sel", "Y");
  1079. model.refresh();
  1080. }
  1081. ]]>
  1082. </script>
  1083. </datagrid>
  1084. <caption id="caption1" class="tit_2" style="left:5px; top:5px; width:108px; height:14px; ">입금내역</caption>
  1085. <line id="line12" class="line_1" style="x1:0px; y1:22px; x2:1190px; y2:22px; "/>
  1086. <button id="button2" class="btn5_letter4" style="left:1126px; top:3px; width:64px; height:19px; ">
  1087. <caption>승인취소</caption>
  1088. <script type="javascript" ev:event="DOMActivate">
  1089. <![CDATA[
  1090. model.resetInstanceNode("/root/sendincm");
  1091. var idx = grd_incm.row;
  1092. var cashcardflag = grd_incm.valueMatrix(idx , grd_incm.colRef("cashcardflag"));
  1093. var vangb = grd_incm.valueMatrix(idx , grd_incm.colRef("vangb"));
  1094. var gPid = "3134314"; //기관미수 환자
  1095. var keyinptflag = grd_incm.valueMatrix(idx , grd_incm.colRef("keyinptflag"));
  1096. var sdata10 = "";
  1097. var sdata11 = "";
  1098. var cardcashno = grd_incm.valueMatrix(idx , grd_incm.colRef("cardcashno"));
  1099. var valiterm = grd_incm.valueMatrix(idx , grd_incm.colRef("valiterm"));
  1100. var allotmm = grd_incm.valueMatrix(idx , grd_incm.colRef("allotmm"));
  1101. var aprvflag = grd_incm.valueMatrix(idx , grd_incm.colRef("aprvflag"));
  1102. var depoAmt = grd_incm.valueMatrix(idx , grd_incm.colRef("incomeamt"));
  1103. //R-카드, S-현금영수증, C-현금
  1104. if("R" == cashcardflag){
  1105. //승인 취소 내역 존재 체크
  1106. if(aprvflag == "11" || aprvflag == "12"){
  1107. if(keyinptflag == "S"){
  1108. sdata10 = cardcashno;
  1109. sdata11 = cardcashno.split('=');
  1110. sdata11 = sdata11[0];
  1111. }else{
  1112. sdata10 = "";
  1113. sdata11 = cardcashno;
  1114. }
  1115. fAppCardVanData(vangb //data1 //vangb van사구분
  1116. ,"21" //data2 //ordergb 거래구분
  1117. ,getCurrentDate() //data3 //mdate 회계일자
  1118. ,gPid //data4 //pano 등록번호
  1119. ,"H" //data5 //iogb 입외구분
  1120. ,"" //data6 //deptcode 진료과코드
  1121. ,"" //data7 //diagdate 진료일자
  1122. ,model.getValue("/root/init/session/userid") //data8 //clientid 수납자
  1123. ,keyinptflag //data9 //entrymode 입력구분
  1124. ,sdata10 //data10 //track2data 트랙data
  1125. ,sdata11 //data11 //cardnumber 카드번호
  1126. ,valiterm //data12 //cardperiod 유효기간/자격확인구분(valiterm/qualcnfmflag)
  1127. ,allotmm //data13 //carddivide 할부개월수/개인법인구분(allotmm/indinstflag)
  1128. ,depoAmt //data14 //netamt 금액
  1129. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvdd")) //data15 //oldappdate 원거래승인일자(취소시)
  1130. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvtm")) //data16 //oldapptime 원거래승인시간(취소시)
  1131. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvno")) //data17 //oldappno 원거래승인번호(취소시)
  1132. );
  1133. if(model.getValue("/root/tmp/appvanif/replystat") != "0000" ){
  1134. messageBox("카드승인취소실패 => "+ model.getValue("/root/tmp/appvanif/cardname") ,"E999","");
  1135. return;
  1136. }else{
  1137. copyNodesetType("/root/sendincm/cardcash" , "/root/tmp/appvanif", "replace");
  1138. model.makeValue("/root/sendincm/cardcash/vangb" , vangb);
  1139. model.makeValue("/root/sendincm/cardcash/incomeamt" , depoAmt);
  1140. model.makeValue("/root/sendincm/cardcash/keyinptflag" , keyinptflag);
  1141. model.makeValue("/root/sendincm/cardcash/valiterm" , valiterm);
  1142. model.makeValue("/root/sendincm/cardcash/allotmm" , allotmm);
  1143. if(keyinptflag == "S"){
  1144. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata10);
  1145. }else{
  1146. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata11);
  1147. }
  1148. //전자서명 처리
  1149. var parm = gPid + "▦" + //PID
  1150. grd_incm.valueMatrix(idx , grd_incm.colRef("incomeamt")) + "▦" + //수납대상금액
  1151. "22" + "▦" + //승인구분
  1152. model.getValue("/root/tmp/appvanif/approvaldate") + "▦" + //승인일자
  1153. model.getValue("/root/tmp/appvanif/approvaltime") + "▦" + //승인시간
  1154. model.getValue("/root/tmp/appvanif/approvalno") + "▦" + //승인번호
  1155. model.getValue("/root/init/session/posinstcd") + "▦"; //기관코드
  1156. setParameter("SPPAO02101_PARM", parm);
  1157. modal("../../../pam/pamcomnweb/xrw/SPPAO02101", "1","400", "400", "SPPAO02101", "", "");
  1158. }
  1159. }else{
  1160. messageBox("선택된 입금내역은 이미 카드 취소가 완료된 내역", "I009");
  1161. return;
  1162. }
  1163. }else if("S" == cashcardflag){
  1164. //승인 취소 내역 존재 체크
  1165. if(aprvflag == "41" || aprvflag == "42"){
  1166. if(keyinptflag == "S"){
  1167. sdata10 = cardcashno;
  1168. sdata11 = cardcashno.split('=');
  1169. sdata11 = sdata11[0];
  1170. }else{
  1171. var sdata10 = "";
  1172. var sdata11 = cardcashno;
  1173. }
  1174. fAppCardVanData(vangb //data1 //vangb van사구분
  1175. ,"51" //data2 //ordergb 거래구분
  1176. ,getCurrentDate() //data3 //mdate 회계일자
  1177. ,gPid //data4 //pano 등록번호
  1178. ,"H" //data5 //iogb 입외구분
  1179. ,"" //data6 //deptcode 진료과코드
  1180. ,"" //data7 //diagdate 진료일자
  1181. ,model.getValue("/root/init/session/userid") //data8 //clientid 수납자
  1182. ,keyinptflag //data9 //entrymode 입력구분
  1183. ,sdata10 //data10 //track2data 트랙data
  1184. ,sdata11 //data11 //qualcnfmno 자격확인번호
  1185. ,valiterm //data12 //cardperiod 유효기간/자격확인구분(valiterm/qualcnfmflag)
  1186. ,allotmm //data13 //carddivide 할부개월수/개인법인구분(allotmm/indinstflag)
  1187. ,depoAmt //data14 //netamt 금액
  1188. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvdd")) //data15 //oldappdate 원거래승인일자(취소시)
  1189. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvtm")) //data16 //oldapptime 원거래승인시간(취소시)
  1190. ,grd_incm.valueMatrix(idx , grd_incm.colRef("aprvno")) //data17 //oldappno 원거래승인번호(취소시)
  1191. );
  1192. if (model.getValue("/root/tmp/appvanif/replystat") != "0000" ) {
  1193. messageBox("현금영수증승인실패 => "+ model.getValue("/root/send/updatedata/bogj/bogj_cardno") ,"E999","");
  1194. return;
  1195. }else{
  1196. copyNodesetType("/root/sendincm/cardcash" , "/root/tmp/appvanif", "replace");
  1197. model.makeValue("/root/sendincm/cardcash/vangb" , vangb);
  1198. model.makeValue("/root/sendincm/cardcash/incomeamt" , depoAmt);
  1199. model.makeValue("/root/sendincm/cardcash/keyinptflag" , keyinptflag);
  1200. model.makeValue("/root/sendincm/cardcash/valiterm" , valiterm);
  1201. model.makeValue("/root/sendincm/cardcash/allotmm" , allotmm);
  1202. if(keyinptflag == "S"){
  1203. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata10);
  1204. }else{
  1205. model.makeValue("/root/sendincm/cardcash/cardcashno" , sdata11);
  1206. }
  1207. }
  1208. }else{
  1209. messageBox("선택된 입금내역은 이미 현금영수증 취소가 완료된 내역", "I009");
  1210. return;
  1211. }
  1212. }else if("C" == cashcardflag){
  1213. return;
  1214. }
  1215. grd_cmpylst.clearStatus();
  1216. grd_cmpylst.addStatus(grd_cmpylst.row, "update");
  1217. model.makeValue("/root/sendincm/clam", getGridUpdateData(grd_cmpylst));
  1218. model.setValue("/root/sendincm/cashcardflag", cashcardflag);
  1219. if(submit("TXAHA02913")){
  1220. btn_srchtrgtman.dispatch("DOMActivate");
  1221. }
  1222. ]]>
  1223. </script>
  1224. </button>
  1225. </case>
  1226. </switch>
  1227. <button id="btn_clam" class="btn_sw" group="sub_tab" selected="true" style="left:0px; top:266px; width:70px; height:22px; ">
  1228. <caption>청구내역</caption>
  1229. <script type="javascript" ev:event="DOMActivate">
  1230. <![CDATA[
  1231. model.toggle("case1");
  1232. // 선택된 메인 스위치의 인덱스 정보를 가져온다.
  1233. ]]>
  1234. </script>
  1235. </button>
  1236. <button id="btn_incm" class="btn_sw" group="sub_tab" style="left:70px; top:266px; width:70px; height:22px; ">
  1237. <caption>입금내역</caption>
  1238. <script type="javascript" ev:event="DOMActivate">
  1239. <![CDATA[
  1240. model.toggle("case2");
  1241. // 선택된 메인 스위치의 인덱스 정보를 가져온다.
  1242. ]]>
  1243. </script>
  1244. </button>
  1245. <button id="button3" class="btn2_letter4" style="left:1098px; top:67px; width:64px; height:19px; ">
  1246. <caption>엑셀저장</caption>
  1247. <script type="javascript" ev:event="DOMActivate">
  1248. <![CDATA[
  1249. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1250. if(fileName != "") grd_cmpylst.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:false;", false, false, "", "", false);
  1251. ]]>
  1252. </script>
  1253. </button>
  1254. <select id="checkbox1" ref="/root/send/srchinfo/clamend" overflow="visible" appearance="full" style="left:975px; top:30px; width:120px; height:20px; border-style:none; ">
  1255. <choices>
  1256. <item>
  1257. <label>입금완료건 포함</label>
  1258. <value>Y</value>
  1259. </item>
  1260. </choices>
  1261. </select>
  1262. <button id="button5" class="btn2_letter4" style="left:1098px; top:262px; width:64px; height:19px; ">
  1263. <caption>엑셀저장</caption>
  1264. <script type="javascript" ev:event="DOMActivate">
  1265. <![CDATA[
  1266. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1267. if(fileName != "") grd_cmpydetllst.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:false;", false, false, "", "", false);
  1268. ]]>
  1269. </script>
  1270. </button>
  1271. <group id="group5" style="left:0px; top:655px; width:1195px; height:80px; ">
  1272. <line id="line2" class="line_1" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  1273. <caption id="caption10" class="tit_2" style="left:5px; top:10px; width:162px; height:14px; ">입금정보</caption>
  1274. <output id="output3" ref="/root/send/cardcashdata/aprv/depoAmt" class="output_fix" format="(-,+)#,###" appearance="output" style="left:88px; top:32px; width:122px; height:19px; text-align:right; "/>
  1275. <line id="line27" class="line_2" style="x1:0px; y1:53px; x2:1194px; y2:53px; "/>
  1276. <caption id="caption14" class="cell_1" style="left:0px; top:30px; width:85px; height:23px; vertical-align:middle; ">입금대상금액</caption>
  1277. <caption id="caption15" class="cell_1" style="left:215px; top:31px; width:60px; height:23px; vertical-align:middle; ">수납방법</caption>
  1278. <caption id="caption16" class="cell_1" style="left:695px; top:30px; width:89px; height:23px; vertical-align:middle; ">카드/현금 번호</caption>
  1279. <caption id="caption17" class="cell_1" style="left:455px; top:30px; width:65px; height:23px; vertical-align:middle; ">개인/법인</caption>
  1280. <caption id="caption18" class="cell_1" style="left:920px; top:30px; width:90px; height:23px; vertical-align:middle; ">유효기간/힐부</caption>
  1281. <caption id="caption20" style="left:1067px; top:32px; width:51px; height:20px; ">(YYMM)</caption>
  1282. <caption id="caption21" style="left:1160px; top:32px; width:31px; height:20px; ">(NN)</caption>
  1283. <input id="ipt_cardno" ref="/root/send/cardcashdata/aprv/cardcashno" navindex="10" style="left:788px; top:31px; width:127px; height:19px; ">
  1284. <script type="javascript" ev:event="onkeypress">
  1285. <![CDATA[
  1286. if (event.keyCode == "13"){
  1287. //R-카드, S-현금영수증, C-현금
  1288. if(rdo_cashcardflag.value == "R"){
  1289. fAfterChangeCardNo();
  1290. }else if(rdo_cashcardflag.value == "S"){
  1291. fAfterChangeCashNo();
  1292. }
  1293. }
  1294. ]]>
  1295. </script>
  1296. </input>
  1297. <select1 id="rdo_cashcardflag" ref="/root/send/cardcashdata/aprv/cashcardflag" appearance="full" cols="3" overflow="visible" style="left:280px; top:34px; width:172px; height:20px; border-style:none; ">
  1298. <choices>
  1299. <item>
  1300. <label>카드</label>
  1301. <value>R</value>
  1302. </item>
  1303. <item>
  1304. <label>현금영수증</label>
  1305. <value>S</value>
  1306. </item>
  1307. <item>
  1308. <label>현금</label>
  1309. <value>C</value>
  1310. </item>
  1311. </choices>
  1312. <script type="javascript" ev:event="xforms-value-changed">
  1313. <![CDATA[
  1314. //R-카드, S-현금영수증, C-현금
  1315. if(rdo_cashcardflag.value == "R"){
  1316. model.setValue("/root/send/cardcashdata/aprv/indinstflag" ,"00"); //00-개인, 01-법인
  1317. model.setValue("/root/send/cardcashdata/aprv/cardcashno" ,"");
  1318. model.setValue("/root/send/cardcashdata/aprv/valiterm" ,"");
  1319. model.setValue("/root/send/cardcashdata/aprv/allotmm" ,"");
  1320. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" ,"S");
  1321. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" ,"");
  1322. cmb_qualcnfmflag.disabled = true;
  1323. ipt_cardno.disabled = false;
  1324. ipt_valiterm.disabled = false;
  1325. ipt_allotmm.disabled = false;
  1326. }else if(rdo_cashcardflag.value == "S"){
  1327. var cmpyno = model.getValue("/root/main/cmpylst/item[" + grd_cmpylst.row + "]/cmpyno");
  1328. model.setValue("/root/send/cardcashdata/aprv/indinstflag" ,"01"); //00-개인, 01-법인
  1329. model.setValue("/root/send/cardcashdata/aprv/cardcashno" ,cmpyno);
  1330. model.setValue("/root/send/cardcashdata/aprv/valiterm" ,"");
  1331. model.setValue("/root/send/cardcashdata/aprv/allotmm" ,"");
  1332. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" ,"K");
  1333. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" ,"4");
  1334. cmb_qualcnfmflag.disabled = false;
  1335. ipt_cardno.disabled = false;
  1336. ipt_valiterm.disabled = true;
  1337. ipt_allotmm.disabled = true;
  1338. }else if(rdo_cashcardflag.value == "C"){
  1339. model.setValue("/root/send/cardcashdata/aprv/indinstflag" ,"00"); //00-개인, 01-법인
  1340. model.setValue("/root/send/cardcashdata/aprv/cardcashno" ,"");
  1341. model.setValue("/root/send/cardcashdata/aprv/valiterm" ,"");
  1342. model.setValue("/root/send/cardcashdata/aprv/allotmm" ,"");
  1343. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" ,"K");
  1344. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" ,"");
  1345. cmb_qualcnfmflag.disabled = true;
  1346. ipt_cardno.disabled = true;
  1347. ipt_valiterm.disabled = true;
  1348. ipt_allotmm.disabled = true;
  1349. }
  1350. model.refresh();
  1351. ]]>
  1352. </script>
  1353. </select1>
  1354. <select1 id="rdo_indyn" ref="/root/send/cardcashdata/aprv/indinstflag" appearance="full" cols="3" overflow="visible" style="left:523px; top:34px; width:87px; height:20px; border-style:none; ">
  1355. <choices>
  1356. <item>
  1357. <label>개인</label>
  1358. <value>00</value>
  1359. </item>
  1360. <item>
  1361. <label>법인</label>
  1362. <value>01</value>
  1363. </item>
  1364. </choices>
  1365. </select1>
  1366. <input id="ipt_allotmm" ref="/root/send/cardcashdata/aprv/allotmm" navindex="12" maxlength="2" style="left:1125px; top:32px; width:34px; height:19px; "/>
  1367. <input id="ipt_valiterm" ref="/root/send/cardcashdata/aprv/valiterm" navindex="11" maxlength="4" style="left:1016px; top:32px; width:49px; height:19px; "/>
  1368. <button id="button8" class="btn2_letter5" style="left:615px; top:32px; width:75px; height:19px; ">
  1369. <caption>국세청코드</caption>
  1370. <script type="javascript" ev:event="DOMActivate">
  1371. <![CDATA[
  1372. model.setValue("/root/send/cardcashdata/aprv/cashcardflag" , "S"); //현금영수증
  1373. rdo_cashcardflag.dispatch("xforms-value-changed");
  1374. model.setValue("/root/send/cardcashdata/aprv/indinstflag" , "01"); //법인
  1375. model.setValue("/root/send/cardcashdata/aprv/cardcashno" , "0100001234"); //차후 공통코드에 내용으로 대체
  1376. model.setValue("/root/send/cardcashdata/aprv/keyinptflag" , "K");
  1377. model.setValue("/root/send/cardcashdata/aprv/qualcnfmflag" , "4"); //사업자번호
  1378. model.refresh();
  1379. ]]>
  1380. </script>
  1381. </button>
  1382. <caption id="caption11" class="cell_1" style="left:215px; top:55px; width:85px; height:19px; text-align:center; vertical-align:middle; ">자격확인구분</caption>
  1383. <select1 id="cmb_qualcnfmflag" ref="/root/send/cardcashdata/aprv/qualcnfmflag" appearance="minimal" style="left:302px; top:54px; width:150px; height:19px; ">
  1384. <choices>
  1385. <itemset nodeset="/root/init/baseinfo/P0073">
  1386. <label ref="cdnm"/>
  1387. <value ref="cdid"/>
  1388. </itemset>
  1389. </choices>
  1390. </select1>
  1391. <caption id="caption12" class="cell_1" style="left:0px; top:55px; width:85px; height:19px; text-align:center; vertical-align:middle; ">입력구분</caption>
  1392. <select1 id="radio2" ref="/root/send/cardcashdata/aprv/keyinptflag" navindex="16" appearance="full" cellspacing="7" cols="2" overflow="visible" style="left:88px; top:54px; width:122px; height:20px; border-style:none; ">
  1393. <choices>
  1394. <item>
  1395. <label>Swipe</label>
  1396. <value>S</value>
  1397. </item>
  1398. <item>
  1399. <label>Key in</label>
  1400. <value>K</value>
  1401. </item>
  1402. </choices>
  1403. </select1>
  1404. <line id="line16" class="line_3" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  1405. </group>
  1406. </xhtml:body>
  1407. </xhtml:html>